import Mock from 'mockjs'

export interface ServiceVO {
  id: number
  serviceName: string
  serviceCode: string
  serviceType: boolean
  description: string
  validDays: number
  menuIds: string

  creator: string
  createTime: Date | number
  updater: string
  updateTime: Date | number
}

// 查询服务信息列表
export const getServicePage = (params) => {
  return Mock.mock({
    'list|1-10': [
      {
        'id|+1': 1,
        serviceName: '@cname',
        serviceCode: '@cname',
        'serviceType|1': true,
        description: '@cparagraph',
        'validDays|+1': 1,
        menuIds: '@cname',

        creator: '@cname',
        createTime: '@datetime',
        updater: '@cname',
        updateTime: '@datetime'
      }
    ]
  })
}

// 查询服务信息详情
export const getService = async (id: number) => {}

// 新增服务信息
export const createService = async (data: ServiceVO) => {}

// 修改服务信息
export const updateService = async (data: ServiceVO) => {}

// 删除服务信息
export const deleteService = async (id: number) => {}

// 导出服务信息 Excel
export const exportService = async (params) => {}
